]> dgit.raspbian.org Git - gnome-shell.git/commit
gdm: Don't try to retry authenticating when the service is unavailable
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 15 Feb 2021 19:59:57 +0000 (20:59 +0100)
committerRay Strode <halfline@gmail.com>
Tue, 16 Feb 2021 18:00:10 +0000 (18:00 +0000)
commit1ee9278786491c46be6526a5100618ea44e40f0a
treea3ce20770d14ad1460d37858aaf8bf0e172a0083
parente65e5edee61282c9662f13e2b455752d6c8216c5
gdm: Don't try to retry authenticating when the service is unavailable

In the case a service is not available (as it can be in the fingereprint
case when a supported reader is available but has not enrolled prints)
we were trying indefinitely to restart it, however this can lead to
troubles since commit 7a2e629b as when the service conversation was
stopped we had no way to figure out this case and we'd end up to
eventually fail the whole authentication.

However, in such cases the PAM services are expected to return a
PAM_AUTHINFO_UNAVAIL and gdm to handle it, emitting service-unavailable
signal.

So connect to ::service-unavailable and keep track of the unavailable
services so that we can avoid retrying with them.
In case such service is not the foreground one, we can just silently
ignore the error as we did before commit 7a2e629b, without bothering
failing the whole verification.

In case we got a valid error message on service-unavailable, we also
show it, this is normally not happening unless GDM isn't redirecting
here other kind of problems (such as MAXTRIES) which are supposed to
stop the authentication stopping any further retry.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3734
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>
js/gdm/util.js